package com.team5.stockservice.mapper;

import com.team5.stockservice.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {

	  List<Goods> select(@Param("providerid")Integer providerid, @Param("goodsname")String goodsname, @Param("productcode")String productcode,
							  @Param("promitcode")String promitcode, @Param("description")String description, @Param("size")String size, @Param("index")Integer index, @Param("limit")Integer limit);
	
	  void insert(@Param("providerid")Integer providerid,@Param("goodsname")String goodsname,@Param("productcode")String productcode,
			@Param("promitcode")String promitcode,@Param("description")String description,@Param("size")String size,@Param("produceplace")String produceplace,
			@Param("goodspackage")String goodspackage,@Param("price")Double price,@Param("number")Integer number,@Param("dangernum")Integer dangernum,@Param("available")Integer available);
	
	  void delete(Integer id);
	
	  void update(@Param("id")Integer id,@Param("providerid")Integer providerid,@Param("goodsname")String goodsname,@Param("productcode")String productcode,
			@Param("promitcode")String promitcode,@Param("description")String description,@Param("size")String size,@Param("produceplace")String produceplace,
			@Param("goodspackage")String goodspackage,@Param("price")Double price,@Param("number")Integer number,@Param("dangernum")Integer dangernum,@Param("available")Integer available);
	
	  List<Goods> selectGoodsName();
	
	  void updateNumber(@Param("id")Integer id,@Param("number")Integer number);
	
	  List<Goods> selectByProviderid(Integer providerid);
	
	  Goods selectById(Integer id);
	
}
